package com.zttek.photosShareProject.modules.service.share;

import com.baomidou.mybatisplus.plugins.Page;
import com.zttek.photosShareProject.common.json.NoticeVO;
import com.zttek.photosShareProject.modules.model.Notice;
import com.zttek.photosShareProject.modules.model.NoticeRead;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Y
 * Date: 2017-09-19
 * Time: 12:26
 */
public interface INoticeService {

    Notice newNotice(String page, boolean publish) throws Exception;

    Notice selectNotice(Integer noticeId) throws Exception;

    Page<Notice> selectNoticePage(Page<Notice> page, Long userId) throws Exception;

    /**
     * 后台分页查询所有系统消息
     * @param page
     * @return
     * @throws Exception
     */
    Page<Notice> selectAllNoticePage(Page<Notice> page) throws Exception;

    /**
     * 后台分页模糊查询所有系统消息
     * @param page
     * @return
     * @throws Exception
     */
    Page<Notice> selectLikeNoticePage(Page<Notice> page,String searchValue) throws Exception;

    /**
     * 编辑系统消息
     * @param notice
     * @throws Exception
     */
    void editNotice(Notice notice)throws Exception;

    /**
     * f发布系统公告
     * @param noticeId
     * @throws Exception
     */
    void publish(Integer noticeId) throws Exception;

    /**
     * 逻辑删除系统公告
     * @param noticeId
     * @throws Exception
     */
    void delete(Integer noticeId) throws Exception;

    List<Integer> getUserDeleteList(Long userId) throws Exception;

    List<Integer> getUserReadList(Long userId) throws Exception;

    NoticeRead selectNoticeRead(Long userId) throws Exception;

    NoticeRead newUserRead(Long userId) throws Exception;

    void readNotice(Integer noticeId, Long userId) throws Exception;

    void deleteNotice(Integer noticeId, Long userId) throws Exception;

    NoticeVO notice2VO(Notice notice, Long userId) throws Exception;

    List<NoticeVO> notice2VO(List<Notice> notices, Long userId) throws Exception;
}
